Authorization Definition Single-Use

SoftwareShield System Feature Guide > Authorization Definitions > Authorization Definition Single-Use

## Authorization Definition Single-Use

An Authorization Definition which is marked as Single-Use will generate Activation Codes that individually can not be used more than once on the same license.

Only some definitions provide the option of making them Single-Use, (see: Authorization Definition Types)

It is important that you understand:

The Single-Use feature of an Authorization Definition applies to a specific instance of an Activation Code that is generated for that definition - not the definition itself.

In other words, each unique Activation Code that is generated for a particular Single-Use definition, can only be input successfully into a given license once. This does not mean that the license can never have that particular Authorization Definition activated again. It just means that it cannot be activated again using the exact same Activation Code. Activations Codes may be different, even for the same definition because they may contain a different parameter, contain a different shelf-life expire date or both.

You have the option of turning off Single-Use for the definitions which provide this feature. If you choose to turn it off, you specify this at the time you develop your license. You cannot override the Single-Use attribute of a definition after you have defined your license.

The Single-Use feature works by entering validated Activation Codes which are marked with this attribute in a list of "already used" Activation Codes. This list is checked to ensure new codes entered, which are marked as Single-Use, have never been used before. This means that in order to be valid, an Activation Code must be generated such that it is unique for a particular machine. Since the FingerPrint for a particular machine is always the same, there are only two other things that will make an Activation Code unique for a particular machine:

1. The embedded Shelf-Life expiration date (which is computed at generation time)

2. The embedded parameter value.

Therefore, if you choose to use Single-Use for a definition and need to issue multiple Activation Codes for that definition to a single machine (customer); then, multiple Activation Codes for that definition for that single particular machine must be either:

1. Generated on a different day and use a Shelf-Life.

2. Generated with a different Shelf-Life (by overriding it)

3. Generated with a different parameter

4. Some combination of any of the above.

This will ensure that the actual Activation Code generated will be unique.

NOTE: If you need to ensure uniqueness for a single customer because you have chosen to use the Single-Use feature, but also need to use no shelf life and the same parameter, you can do the following to generate Activation Codes which are still unique. Simply use a Shelf-Life that is so far in the future that it becomes effectively irrelevant. For example, if you use a Shelf-Life of 7300, the code will be valid for 20 years. This ensures that codes do not (effectively) expire since that code and probably your software will be long gone in 20 years, codes generated with this Shelf-Life period on different days will always be unique.

> ### Example

> You have a General Use Authorization Definition which you use for tracking pay-per-use of a particular feature in your software. The parameter value stored inside this definition is the remaining paid uses. It is marked as Single-Use and uses a Shelf-Life of 30 days. To "re-charge" a users license with (for example 10 more uses) you will issue them an Activation Code for this definition with a parameter value of 10. If the definition was not Single-Use, they might enter the code repeatedly 5 times and have 40 illegal uses available to them. However, you did mark it as Single-Use. You issue them an Activation Code for 10 uses which might be generated as "ABCD-1234-AAAA-FFFF". They will enter the code once, it will be validated and the General Use Authorization Definition will be activated with the new parameter value. If they enter that code again - it will not be validated and your program will receive a return code indicating that the code had already been used.

> On another day, they buy more uses from you and you issue them another Activation Code for the exact same Authorization Definition with the same parameter (10), but because you are also using a Shelf-Life the Activation Code will be generated differently. This time it might be "BBBB-CCCC-1234-1234". Again, they can input the code and it will be validated and the General Use Authorization Definition will be activated with the new parameter value. Again, If they enter a code already used (ABCD-1234-AAAA-FFFF or BBBB-CCCC-1234-1234) more than once - it will not be validated and your program will receive a return code indicating that the code had already been used.

### More Information

For help in actually setting the Single-Use attribute of an Authorization Definition, please see Setting An Authorization Definition as Single-Use in the SoftwareShield License Manager Reference.